ACTOR EMPZombie: RGAMonster
{
    Health 60
    Radius 20
    Height 56
    Speed 8
    PainChance 170
    MONSTER 
    +FLOORCLIP
	+MISSILEEVENMORE
    SeeSound "grunt/sight"
    PainSound "grunt/pain"
    DeathSound "grunt/death"
    ActiveSound "grunt/active"
    Obituary "EMP Zombie fried %o's pacemaker."
    MissileType ZombieEMPBlast
	DropItem "HandgunAmmo" 128
    States
    {
    Spawn:
		RPOS A 0
		RPOS A 0 Thing_SetSpecial(0,226,613,0,random(10,15))
		RPOS A 0 A_GiveInventory("XPAmount", random(10, 15))
		RPOS P 0 ACS_ExecuteAlways(651,0,0,0,0)
        RPOS AB 10 A_Look		
        goto Spawn+4
    See:
        RPOS AABBCCDD 4 A_Chase
        Loop
    Missile:
        RPOS E 10 A_FaceTarget
        RPOS F 6 A_MissileAttack
        RPOS E 2 A_FaceTarget
        RPOS F 6 A_MissileAttack
		RPOS E 2 A_FaceTarget
        RPOS F 6 A_MissileAttack
        Goto See
    Pain:
        RPOS G 3
        RPOS G 3 A_Pain
        Goto See
    Death:
        RPOS H 5
		RPOS H 0 A_JumpIfHealthLower(random(-500,-110),"XDeath")
        RPOS I 5 A_Scream
        RPOS J 5 A_Fall
        RPOS J 0 ACS_ExecuteAlways(648,0,0,0,0)
        RPOS K 5
        RPOS L -1
        Stop
    XDeath:
        RPOS O 5
        RPOS P 5 A_XScream
        RPOS Q 5 A_Fall
        RPOS Q 0 ACS_ExecuteAlways(648,0,0,0,0)
        RPOS RSTU 5
        RPOS V -1
        Stop
    Burn:
       BURN A 5 BRIGHT
       BURN B 5 BRIGHT A_Pain
       BURN C 5 BRIGHT
       BURN D 5 BRIGHT
       BURN E 5 BRIGHT A_Pain
       BURN F 5 BRIGHT
       BURN G 5 BRIGHT
       BURN H 5 BRIGHT A_Pain
       BURN I 5 BRIGHT
       BURN J 5 BRIGHT
       BURN K 5 BRIGHT
       BURN L 5 BRIGHT
       BURN M 5 BRIGHT
       BURN N 5 BRIGHT A_Scream
       BURN O 5 BRIGHT A_NoBlocking
       BURN P 5 BRIGHT
       BURN Q 5 BRIGHT
       BURN R 5 BRIGHT
       BURN S 5 BRIGHT
       BURN T 5 BRIGHT
       BURN U 5 BRIGHT
       BRNT V -1 
       Stop        
    Raise:
        RPOS KJIH 5
        Goto See
    }
}

actor ZombieEMPBlast
{
  Radius 13
  Height 8
  Speed 32
  Damage 1
  Projectile
  +RANDOMIZE
  RenderStyle Add
  DamageType EMP
  Alpha 0.75
  scale 0.25
  SeeSound "weapons/iceshot"
  DeathSound "weapons/icehit"
  Decal EMPLightning
  States
  {
  Spawn:
    BFS1 AB 4 bright
    loop
  Death:
    BFE1 AB 8 bright Radius_Quake(3,30,0,128,0)
    BFE1 C 8 bright 
    BFE1 DEF 8 bright
    stop
  }
}
    
actor EMPEffect : PowerupGiver 
{ 
  Inventory.PickupMessage "Your electronics are out!" 
  Inventory.MaxAmount 0 
  Powerup.Type EMP
  Powerup.Duration -7
  +AutoActivate
  +Inventory.AlwaysPickup
  states            
  { 
  Spawn: 
    TNT1 A 1
    Fail
  } 
}

Actor PowerEMP : PowerSpeed
{
  Speed 1.0
}

